MiniBase 2

© Unley Enterprises 1998-1999

A mini database program for the home PC

MiniBase is a general purpose database program developed for the home PC. You can create and maintain your own tables for nearly all kinds of data. It uses its own database engine and does not require any other products in order to work.

Features

•	 New: Store memos, formatted text and pictures in your tables

•	Unlimited records for each table

•	Fully customisable table creation

•	Up to 25 fields and 10 indexes per table

•	Flexible searching functions

•	Filter records to examine only those of interest

•	View your data in either tabular format or form outline

•	Import data from text files or other MiniBase tables

•	Export data as text or XLS files

•	Print the table contents

•	Numerical analysis of table data

•	Assistants to help create tables, import and export data

•	Utilities for copying, renaming, deleting and rebuilding tables


Introduction

MiniBase Help outline 1

Introduction

Overview

Who should use MiniBase

Licensing

Quick start

Quick tour

Getting started in a hurry

Database essentials

Overview

MiniBase record structures

MiniBase table and index structures

Working with tables

Opening

Closing

Sorting

Setting ranges

Clearing ranges

Navigation

Emptying

Creating

Renaming

Deleting

Copying

Restructuring

Importing data

Exporting data

Printing

Working with records

Using Memos

Using Pictures

Editing

Canceling changes

Deleting

Inserting new records

Writing changes to the database

Searching

Bookmarking


Introduction

MiniBase Help outline 2

The New Table Assistant

Introduction

The Table designer

Introduction

Table designer modes

Designing Fields

Adding a field

Deleting a field

Editing a field

Changing the order of fields

Designing indexes

Selecting an index

Adding an index

Deleting an index

Renaming an index

Editing an index

Borrowing another table's design

Creating a table


Introduction

MiniBase - a mini database for the home PC

What is MiniBase?

MiniBase is a small desktop database application. It allows you to create your own tables to keep whatever data is of interest. Once in a table you will be able to manipulate your data to sort it, find items of interest, update entries and add or delete data.

MiniBase is intended for desktop computers where only one person needs to access and change data at one time. In these situations most applications need to only record hundreds or thousands of data items and the large commercial database programs with their high price tags can be overkill.

With MiniBase you have most of the essentials of the larger programs in a small portable application. MiniBase allows you to create and maintain your own data tables and provides the ability to analyse your data and export it into other programs.


Use
Introduction

Who might use MiniBase?

MiniBase was designed for people who want some way of organising their data, when they had  hundreds or several thousands of things to keep track of, sort, edit insert and delete. In these situations most people don’t need to share their data over computer networks and don’t want to learn some huge (and expensive) corporate database system in order to manage thir information on their home PC. In these situations, the complexity and wide range of (sometimes obscure) functions of the commercial datase systems can be more of a hinderence than a help.

MiniBase allows single users to access their data and provides a simple set of tools for manipulating the data. It aims to keep things as simple as possible and especially tries to make it possible for first time users to store their own data with a minimum of fuss.

Who should not use MiniBase?

MiniBase is not a corporate database system developed by a team of programmers and with years of use involving millions of records. It aims to be a simple and reliable system for the home PC user who wants to store up to thousands of records only.

If you want to store larger amounts of data, are storing critical data where possible data loss would be a disaster, or want to have multiple users accessing data simultaneously then the commercial database systems are what you should use (that’s why they cost the big bucks!)


Licensing
Introduction

Licensing

This version of MiniBase is a beta release. It is fully functional and will not expire

MiniBase is copyright 1998-1999 by Unley Enterprises. All rights reserved.

The use MiniBase is entirely at your own risk. While very effort has been made to ensure that MiniBase operates as intended, no responsibility will be accepted for problems that occur related to the use of this program.


Forms
MiniBase Contents

Quick tour

The essential forms in MiniBase are:

•	The Main form is where tables are opened and closed and the program closed. Below is shown a picture of the main tool bar in the the main form. All of the main functions of MiniBase can be reached from this point

•	The Data form is where your tables can be viewed and edited. Data can be viewed in either a grid format or form mode. A picture of the data form is shown below. It shows a split view of the grid form on the left and form view on he right. It is possible to alter the appearance of the data grid. The order of the fields as they appear in the grid can be changed by simply clicking the mouse on the column title and dragging the column to its new position. A column’s width can be changed by dragging the right edge of the column in the grid title bar. Finally, you can alter the font and appearance of the grid by selecting Format in the main menu and setting either the title or data font and the presence or absence of grid lines.

•	The Control Panel is where the more complex operations are performed. This panel allows you to manipulate the table index, ranges, filtering, search for and bookmark records. It remains open until closed by you and allows you to see directly the result of your selections. A picture of the Filter page of the Control Panel is shown below.

•	In addition, there are forms to help create tables, import and export data, analyze data in tables and help design tables.

MiniBase Structure

MiniBase has been designed in order to make using the program as easy as possible. Therefore MiniBase has a number of simplified functions available to allow new users to create and manipulate their tables without knowing much about the workings of data tables.

Important restrictions in MiniBase are that each table can only be opened by one user at a time. In addition, each table must have a primary index and each index value in the primary index must be unique. This means that some care must be taken when designing your own tables if not using the New Table Assistant.


Database essentials

Overview

There are a few important terms to understand in the world of databases – tables, records and fields. A few additional terms that will help down the track are indexes (primary and secondary) .

Think of a database as a filing cabinet. Within the filing cabinet there might be lots of folders (with those annoying metal hooks that are meant to keep the folder on the cabinet drawer tracks but keep falling off, spilling all your documents !). Then within each folder you might have lots of invoices etc. For example your credit card receipts might make up one folder (note that each receipt will have a similar structure, although the actual contents will vary).

Well a database program is like the filing cabinet. It does not do anything by itself, but it provides a means of organizing your documents etc. Each folder in the database could be a table in a database. A table is simply a way to keep similar sorts of items together. Each individual item in a table is called a record – this corresponds to a piece of paper within your folder. Finally, each record can have several subitems within it. These subitems are called record fields (or fields for short).

As an example, you might have a table for your credit card receipts. Each record could contain the information of one of your receipts. The fields in the records might contain such things as the date of purchase, type or purchase and amount etc.

Now databases such as MiniBase do have some restrictions. These are because computer programs are generally rigid things and follow rules. These mean that each record in MiniBase must have the same fields as all the other records in that table. You don’t have to put data in all the fields unless you want to, but the field will be there for each record.

When you create a table it is empty (has no records). As you go along you add, delete or alter records and the table changes accordingly.

The advantage of a database over the paper folder can be its ability to easily store, sort analyze and find information for you.


MiniBase structure
MiniBase record and table structures

Record data formats

Data Types

MiniBase records can contain different types of data. These types are:

String:	strings are simply text of no special type. For example, someone’s name or your country, is a string when typed into a computer. Use strings for any general sort of text you want to put into your tables. The most efficient use of strings is when you tell MiniBase what the maximum number of characters in you string will be for any record. The largest possible string that can be used is 255 characters in length – this is about two or three lines of type text (and includes spaces)

Integer: Integers are whole numbers (i.e. no decimal  places). These can be any value, including negative numbers and zero. The largest possible integer value than MiniBase can accept is 2,147,483,647 and the lowest is –2,147,483,648.

Float: These are decimal point numbers and can also hold numbers too large to fit in an integer. Floating point numbers can be any number between 5.0 x 10^–324 and 1.7 x 10^308

Boolean: Boolean data types are simply true/false values. They can’t contain values other than these.

Date/Time: DateTime fields store dates from and times in year 2000 compliant fashion. Just dates or times can be entered into these fields or both together.

Currency: These are numbers that can hold the local currency. They are shown with the local currency sign preceding the amount and can hold a similar range of values to a float field (which is a lot of money !)

Auto-increment: This is really an integer field, with the ability to increase by one for each new record you enter. This field is not editable and is useful in creating primary indexes to ensure unique index values.

 In addition, MiniBase allows each field to have no value at all – this special value is called a null value and simply says ‘this field has no data in it at all’. Null is not the same as 0 (zero) for a number field and can be thought of as a ‘nothing’ value. When MiniBase is sorting records in order, null values are considered to be the smallest value possible.


MiniBase table structure
MiniBase record and table structures

Table and index formats

MiniBase table access is restricted to one user only at a time. It is not possible to have the same table open more than once, and attempting to do so will cause an error message to appear.

MiniBase uses its own file format for the data and index files it creates.

The basics of table design are fairly simple.

A table simply contains all of your records in what is called a flat file structure -  think of it as your records lying in a long row. However, having your data like this is not likely to be very useful. If you have several hundred names and addresses in your table and want to find John Smith, you will have to examine each record in turn until you find the one you want - a database that did this would not be much of a time saver! To make your tables useful it is necessary to create indexes.

Each table can have up to 10 indexes in total. An index is simply a way of give your records some order within your table. An index will sort all your records from lowest to highest values (and update this automatically each time you add, delete or change a record). You can design each index to sort fields that are interest to you when you design the table.

MiniBase requires that each table have at least one index. This is called the primary index (or primary key). Furthermore each value in the primary index must be unique. MiniBase simply wont allow you to enter duplicate records as far as the primary index is concerned. Although this seems a bit severe, it is done to ensure that searches for records dont fall into a group of identical records and get 'lost'.

The other (non primary) indexes are called secondary indexes - these dont have to have unique values as they rely on the primary index to save them from identical values.

Each index you create can have up to 10 fields and you can design them to suit your own needs. Using the address book example above, you might decide to index your contacts by last name then first name then create another index ordering by first name then last name to help you out when someone only gives you their first name and your memory fails.

Primary indexes can be good and bad. They ensure that searches can give unique results but can lead to problems by preventing you from entering similar data. Often careful design of your tables will prevent this, but MiniBase also provides an inbuilt ability to help out. If you dont want to have to worry about maintaining you primary index, MiniBase allows you to define a special field as the first field of your table at design time. This is an Auto-increment field and it ensures that each new record in the table is given a higher value than the record before. By putting the Auto-increment field in your primary index MiniBase will automatically ensure your primary index is unique. This is what the New Table Assistant does in order to remove the hassles of thinking about the primary index from the user.


Quick Start

Getting started in hurry

MiniBase has several function to help you get started quickly without having to read all the help file. These functions present simplified forms of the more complex table manipulation functions in MiniBase which you use the functions without worrying about the details of how they work.

The functions available to help you get started quickly are:

The New Table Assistant - this guides you through the creation of your tables (and provides a few templates for you to use as starting points if you wish), and takes care of the hassles of setting indexes etc.

Quick Filter Form - this simple filter allows you to restrict the records currently visible in your table, so that you can zoom in only on the records of interest.

Quick Search Form - Quick Search searches for a value you select on the currently selected field in your table.


Opening tables
Working with tables

Opening

      To open a table, select a MiniBase file (file extension *.mti) using the Open File dialog form. This can be reached from either File | Open table menu or the Open table button. Once selected the table will be opened for viewing or editing in a window.


Closing tables
Working with tables

Closing

      To close an open table select the File | Close table menu item. If the table has unsaved changes you will be asked to confirm whether you wish these to be saved prior to the table closing.


Sorting tables
Working with tables

Sorting

      Tables can be sorted according to one of the predefined indexes available for that table. To change an index select the Table | Sort table menu item or press the sort table button. This will show the index selection page of the Control Panel. This form contains a drop down list of all possible indexes to select. If the new index is different from the current index, the table will be sorted according to the new index and the first record selected.

The primary index is always called just that - ‘Primary index’ (or primary key). Each of the other indexes can be accessed using the name you gave then index when the table was created.


Setting ranges
Working with tables

Setting ranges

When it is desired to work with only a portion of all the available records in the table, then the range of records can be restricted to only the desired subset. To set such a range select the Table | Restrict range menu item or press the Control Panel button. This shows the range selection page of the Control Panel. The range selection form shows a list of the table fields in the current index. A value can be entered for each field for both a minimum and maximum allowable value to show. If you do not enter any values into a field then it is considered a 'null' value (a null value is less than any entered field data).

The range selected can be considered as:

Minimum values <= records in range <= maximum values

To apply the entered values press Apply.


Clearing ranges
Working with tables

Clearing ranges

      Clearing a range remove any range restrictions. The first record in the table becomes the selected record after clearing a range. To clear a range, select Table | Clear range or select Clear range from the Range Selection Page on the Control Panel.


Filtering
Working with tables

Filtering

Filtering essentials

Filtering allows further data restriction beyond that provided by indexes and ranges.

Filtering is a means of restricting the records on view. You can set and change the criteria for seeing the records at any time. In addition, the criteria can include partial string matches and case-insensitive string matches. Filtering has its own fairly simple language structure. A filter expression is simply a line of text, and is probably best shown by example.

If you had a table with the following field definitions

Field name	Field type

Field1	String

Field two	Integer

Field three	String

Field four	Boolean

Field5	Float

Then the following are examples of valid filters:

Filter text

1.	Field1 < ‘Smith’ and [Field two] = 111 and [Field four] = false:

2.	Field5 < 123.321 and Field5 > 23.321

3.	[Field four] not null

1.	[Field three] = null

Note that the filter reads much like a mathematical equation and is fairly self explanatory. Several specific points should also be highlighted:

1.	The use of square brackets [] – these are necessary when the field name can contain blank spaces or non-letter characters.

2.	When entering text values to compare against, place them in single quotation marks.

3.	Null is a blank value (no value). It is possible to include these values in your filter as well

In addition, filters can include special conditions:

1.	Partial string matching. It is possible to match partial strings (i.e. inexact matches) by selecting the partial match check box. In addition, put a ‘*’ character at the end of strings that you want to partially match on.

e.g. if the filter is [Field1] = ‘Smith’ or Field1 > ‘Jo*’

4	then	‘Smith’, ‘Johansen’ and ‘Jones’ will pass

5	but	‘Smiths’ and ‘Jibe’ will fail

1.	String comparisons can be made case-insensitive by selecting the case-insensitive check box before setting the filter.

Setting Filters

To set or change a filter Select Table | Filter from the main menu or select the Filter settings page if the Control Panel is visible.

To put in a filter, type the filter text into the Filer text edit box.

Select any filter options you want to apply

Check the Filter on check box to set the filter on or off

Apply the settings by pressing the Apply settings button


Navigating tables
Working with tables

Navigation

      The table may be navigated from within the table grid itself or from the Navigator panel on the table from or from the main menu.

Commands

First: move to the first record in the current range

Last: move to the last record in the current range

Next: move to the next record after the current record

Prior: move to the record prior to the current record

Find… : Find First, Find Next, Find Prior, Find Last

The Find functions will search for records satisfying the filter text entered in the control panel for the table. If a record is found that satisfies the criteria then the table will move to that record. If no record is found, no move occurs. If no filter text is entered, the Find functions behave the same as First, Next etc.

Navigation bar

The Navigation bar contains most of the common commands to work with tables. Basic navigation is through the left hand buttons, while the buttons to the right add, delete and edit records.


Emptying tables
Working with tables

Emptying

      The table can be emptied of all records by selecting Table | Empty table. Warning - this command will delete ALL records in the table and cannot be undone.


Creating tables
Working with tables

Creating

      A new table can be created using either the Table Designer or the New table Assistant. To create a table press the New table button. Select either the Table Designer or New Table Assistant from the drop down menu that appears


Renaming tables
Working with tables

Renaming

      A table can be renamed by selecting File | Utilities | Rename. The destination name must not be already be in use and the table to be renamed must be closed.


Deleting tables
Working with tables

Deleting

      A table and all its associated files can be deleted by selecting File | Utilities | Delete. The table must not be already be in use. This will delete all files and all data will be lost. This cannot be undone!


Copying tables
Working with tables

Copying

      A table with all its associated files can be copied by selecting File | Utilities | Rename. The destination name must not be already be in use and the table to be copied must be closed.


Restructuring tables
Working with tables

Restructuring

Tables can be restructured after creation. To restructure a table, open the table, then select Tables | Restructure. This will open the Table Designer. Make the desired changes and select ‘Restructure’. The expected results of the restructure will be shown prior to completing the restructure in order to allow mapping between the fields of the old table and the new. The restructuring of large tables can take time as each record must be read and the indexes rebuilt.


Rebuilding tables
Working with tables

Rebuilding

If a table becomes corrupted for whatever reason, then MiniBase may no longer be able to open and read it. If this happens it may still be possible to recover the data inside by rebuilding the table. To rebuild a table select File | Utilities | Rebuild. Enter the name of the file to rebuild and press OK. If the table was rebuilt, then a message will appear, reporting how many records were recovered ad whether any damaged records were found. If the table cannot be rebuilt, a message will appear reporting this


Importing data
Working with tables

Importing data

Importing from Text Files

Introduction

MiniBase can import data from formatted text files. Most databases and spreadsheets can export data to this format. As the details of how the data is formatted vary, you can customize how MiniBase reads the text file in order to prevent a loss of data.

To import data open the Data Import Assistant. This will step you through the import  process. First decide if the text file is a fixed width file or has some marker delimiting each field in the file.

Both formats have one record per line.

The first line may contain table field names from the exported table.

Fixed Width Files

A fixed width file will have the same number of characters for any given field across all records. The width may be the same for all fields or may vary for each field. No special character indicates the start and of each record. Blank spaces make up any gaps between fields. In the fixed width grid set the width of each field to the appropriate width. The first few lines of the text file are shown in the data import grid are shown in order to provide a sample of the input

If all widths are the same, enter the field width by setting the width in the spin edit box and pressing the default width button. If the widths vary, you will need to enter each width in turn.

File Format Settings

This page of the Import Assistant allows you to set various formatting that may be need to successfully import data. If the file uses field delimiters (commonly commas or semicolons between fields) then you can select the appropriate delimiter here (note that this is not need for fixed width files and is disabled)

Some files treat string fields differently to other data types and use string delimiters. If these are present select the appropriate delimiter form the combo selection (or enter your own).

Date formatting can vary from location to location and between computer programs. MiniBase has tried to be as flexible as possible with date formats and simply requests that you give it the expected order of the components of the dates (e.g. DMY for Day Month Year or MDY for Month Day Year).

Finally, some export files will contain the names of each of the exported fields in the first row of the file. MiniBase does not need this information, but to avoid problems select the check box to tell MiniBase if the first file row contains data or field names.


Importing from other MiniBase files

MiniBase can also import data from other MiniBase files. To import data in this way select Import and the MiniBase table you want to import from. The Import Assistant will show the first few lines of the table you are importing from in the upper (import) grid.

Field Mapping between tables – the Mapping Page

The mapping page contains a grid with 2 columns. The column on the right contains a list of the fields in your destination table. The left column contains a list of fields from the import source table, or text values if importing from a text file, next to the destination fields they will map to. Where no field is matched the left column contains the text ‘no field’.

A drop down list above the left column contains a list of all possible fields in the import source table for you to perform your own matching with.

MiniBase attempts to guess how you would want to import the data. It checks each table (your import source table and your destination table) and tries to match fields between the two. It will match fields if the field names correspond and the data type and size match. If no match is obvious then no guess will be made and the mapping column on the let will contain the text ‘no match’.

You can select you own mapping by selecting the destination row you want to match to. Then go to the drop down list and select a field (or ‘no field’ to remove a match) to match with. If MiniBase thinks that this may cause a situation where data may be lost in the import conversion it will highlight these fields by showing them in red.


Completing a Data Import

Sample Table data after import

The final page of the Import Assistant shows a few sample rows from the import text file or table as they will appear after importing. This is a good opportunity to check that the processing of the import data is as expected and that it is safe to proceed.

Completing data import

Once you are happy with the import output, select Finish. MiniBase will work through the file or table importing as many records as possible. If errors are encountered, their presence is noted but MiniBase will attempt to continue processing. At the completion of importing, MiniBase will report the number of records imported and the number of data conversion errors encountered.

When an error is encountered in trying to force data into MiniBase field, the field will contain no value (i.e. be a null field).

Remember that your imported data must follow the same rules regarding unique values for the primary index of your table as would normally apply. Records that would cause key violations in your table are not inserted. The Import Assistant will move onto the next record instead.


Exporting data
Working with tables

Exporting data

MiniBase can export data to XLS files (Excel readable) or to text files.

To export to a Excel file, select Table | Export, then the Excel option.

MiniBase can export table data into text file format. To export data select Export and the Export DataAssistant will open. This will show some of the table data as a sample in the upper grid

The first selection is to decide whether to export your data as fixed width or use some kind of field delimiter (such as a comma). Select one of the 2 options and move to the next page.

The formatting page has several items for formatting your exported data. The first item is the field delimiter drop down list (if you have selected fixed width export then this will be disabled). The next item to choose is whether you want to delimit string fields specifically (this is an option with some databases). The next item is to select the format of exported date containing fields (such as DMY - Day Month Year or MDY Month Day Year). Finally, if you want the first line of your exported text file to contain the table field names, select this option.

The final page of the export data Assistant is the Output page. This gives a sample of several rows of the text file as it will appear. This is the time to verify your formatting, and that the output is as you want. If not, simply return to an earlier page of the Export Assistant and alter the settings.

If you are happy with the formatting, select Finish, select a file name for your exported data and the Export Assistant will traverse the records currently available in the table and create your text file.


Printing tables
Working with tables

Printing

MiniBase has a simple reporting function that will print the contents of your current table settings – using the current index, range and filter. In addition the printer output will be formatted in the same way as your grid. This flexible mechanism allows you to set the field order in the printout by changing the field order in your grid. In addition you can use the settings on your grid to restrict the records that are printed, without having to format a report separately. The font settings of the data grid will also be used to set the report output.

The report function has a preview component that allows you to verify your output before sending it to the printer. It is also possible to alter the printer settings in the preview window. If you alter the settings, these will not be shown in the current preview, but will be used to format the printer output if you print from the preview.

It is possible to save your printout to a file for later printing from the preview window, by selecting the Save button. Similarly it is possible to print a previously save printout by opening a report file in the preview window.


Memos
Working with records

Memos

Memos are a new feature of MiniBase. Tables can be created that can include two types of memos - normal and formatted. Formatted memos can contain simple formatting such as bold, different font styles and other simple procedures. Normal memo fields can contain text but without any special formatting.

Both types can store memos of any length.

Because memos can contain a lot of data they cannot be properly viewed from the data grid like the other fields. MiniBase has a memo viewer which is an easy way for you to see and edit your memos (the same operations can be done from the form view).

The memo viewer can be opened by clicking on the memo field in the data grid and then selecting view blob from the popup menu or by double clicking the field. The memo viewer will show the field contents and allow you to cut to or paste from the clipboard. In addition, memo fields can be edited directly (although without any formatting functions).

In general, the easiest way to work with blobs is to create them in another program and then paste them into MiniBase from the clipboard.

Saving and editing memos works the same as for any other data changes you make in MiniBase.

Note that memo fields cannot be used in indexes.


Graphics
Working with records

Graphics

Another new feature of MiniBase is its ability to store pictures in your tables. These pictures are stored in bitmap form and can be of any size.

Working with pictures is much the same as working with memos - simply open the blob viewer and paste from the clipboard or copy to the clipboard.

Note that graphic fields cannot be used in indexes.


Editing records
Working with records

Editing

Records can be edited automatically from within the table grid by selecting the item of interest and entering new data. The data will be verified when moving off the item and written to the table file when you move off the record or press the Post button on the navigator panel.


Canceling changes
Working with records

Canceling changes

      To cancel changes before the changes have been posted to the table, press the cancel button on the navigator panel or press the escape button on the keyboard. Once the changes have been written to the table file, calling cancel will have no effect.


Deleting records
Working with records

Deleting

      To delete a record select Record | Delete, press the delete button or press Ctrl - Delete on the keyboard simultaneously. Note that deleted records cannot be restered.


Inserting records
Working with records

Inserting new records

      To insert a new record select Record | Insert, press the insert button or move beyond the last record in the table from within the table grid. Once the record data has been edited the new record is written (posted) in the table by moving to another record or pressing the Post button on the navigator bar.


Posting records
Working with records

Writing changes to the database

To write new data to the database select Record | Post, press the post button or move off the current record.


Searching for records
Working with records

Searching

Searching can be performed on indexed or non-indexed fields. Any number of fields can be selected by entering search values in the Search Page of the Control Panel. If a matching record is found, the table will move to that record. If no match can be found a dialog box will report that.

Searching can also include partial string matching and case insensitive matching. These options can be selected by checking the boxes on the Search Page.

Once values are entered select the type of search options and press Apply.


Bookmarking records

Records can be bookmarked for later review. To bookmark a record, select Records | Bookmark. This shows the bookmarking form. The bookmarking operations are:

Add	-	This will bookmark the current record of the table. Any  name can be used to identify the bookmark.

Delete	-	This will delete the currently selected bookmark

Go to	-	This will make the bookmarked record, the currently selected table record

Note that bookmarks remain valid when indexes change or records are edited. If a bookmarked record is deleted, then selecting that bookmark will have no effect.


Table data form
Viewing your data

Grid view and form view

Viewing Modes

Grid Mode

Table data can be viewed in either of 2 modes. To see multiple records at once select View | Grid View. This opens your table in tabular format with each record occupying one row, with each field shown in columns.

Form Mode

To see one record at a time, select View | Form view. This opens a your table in single record mode. Each field is contained within its own edit box, with the field name to the left.

Other feature of the table form

In both modes, the table navigator bar can always be seen on the top of the form. This provides a simple means to move from record to record, insert or delete records and send edits to the table files. The bottom of the MiniBase main form show some details of the table currently active. The status bar shows the current record number and total records within the current data range and the current state of the table.


New Table Assistant
The New Table Assistant

Introduction

The New Table Assistant aims to simplify the process of creating your own tables. It still allows you to specify the number and type of fields in each record in your table but hides some of the more complex details regarding table indexes. However, each table created by using the New Table Assistant is a full blooded MiniBase table and, if you wish, it is possible to alter the design of the table later on by restructuring it.

To open the New Table Assistant press the new table button a select New Table Assistant from the drop down menu.

The first page provides the option of either using a template to start your design off or starting your table from scratch.

The templates are simply outlines of some more common table designs that people find useful and can give ideas on what fields your table might need to contain. The templates are by no means inclusive and are intended to simply provide a starting point. To select a template simply choose one of the titles from the list and select ‘Next’

The next page is the fields editor page. On this page each potential field for your table is listed. Each line includes the field name (which must be unique and not blank), the type of data the field will contain and whether or not the table will be able to sort its records on that field. The first field in each table created by the New Table Assistant is called the ‘table counter’ and is compulsory. This field is needed to help create and maintain your indexes behind the scenes and cannot be altered or removed.

To add a field to your table, press ‘Add field’. This will bring up a dialog form for you to enter the details of your new field. The only thing you must enter is a name for your field. If you know exactly what kind of values your field will contain, then select that option from the pull down list. If you are not sure or think that the values might vary (e.g. a code number for some item might usually be a number but rarely might contain letters), then leave the data type as text. Text data is able to contain essentially all sorts of information and is the most flexible kind of data type. If you want to able to sort your table on this field, put a check mark in the Sort field check box (each MiniBase table can contain up to 10 sortable fields this way, including the table counter).

Once your have entered your field details, press OK and you will return to the main editor page.

To change the details of an existing field (except the table counter), select the field and press ‘Edit field’. The field details dialog will be shown containing the field. Make your changes and press OK.

To delete a field simple select the field and press ‘Delete field’.

Once your are happy with your table design press ‘Next’. The New Table Assistant will check for errors and take you to the final page. Press ‘Finish’ and enter a name for your table. Then press OK and your table will be created.


Table designer

Introduction

The table designer is used when creating new tables or reviewing the structure of an existing table. It has 2 main portions - the fields editor and the index editor. A valid table must contain at least one field and one index. Each field must specificy at least a field name (not blank) and a field type. A valid index must contain one or more fields. Like each field, each index must have a unique name. The primary key or index is automatically named ‘null’ or blank. Each record in a table must have a unique primary key. Entering a new record with the same primary key as an existing record will cause an error message to appear. Bear this in mind when creating new tables.

Table Designer Operations

Table designer modes

Designing Fields

Adding a field

Deleting a field

Editing a field

Changing the order of fields

Designing indexes

Selecting an index

Adding an index

Deleting an index

Renaming an index

Editing an index

Borrowing another table's design

Creating a table


Table designer modes
Table designer

Table designer modes

Viewing mode

Viewing mode is used for reviewing the structure of an existing table. In view mode the table designer is read only and no changes can be made to the table structure.

Design mode

Design mode is used for creating new tables.

Restructure mode

Restructure mode is used for altering existing tables.


Table designer designing fields
Table designer

Designing Fields

Each table consists of multiple fields and each field has several parameters. Each field must specify a unique name and a field type in order to be valid. Up to 20 fields may be entered.

Field parameters

Field name

A unique name of up to 20 characters.

Field type

The field types are Boolean, Currency, DateTime, Float, Integer and String. The field designer contains a drop down list of these options.

Field size

Field size is only valid for string fields. String fields may be from 1 to 255 characters in length.

Required field

A field may be selected as a required field, meaning that a value must be entered for the field for each record in the table.

Default value

A field may contain a default value. This value will be automatically entered for each new record created, but can be overwritten.

Minimum value and Maximum value

For field types of Currency, Float and Integer, a minimum and maximum value may be entered at design time to restrict the range of data that may be entered.


Table designer - adding fields
Table designer

Adding a field

To add a field press the Add field button or move beyond the last entered field within the Fields grid.


Table designer - deleting fields
Table designer

Deleting a field

To delete a field, press the Delete field button or press Control-Delete simultaneously.


Table designer - editing fields
Table designer

Editing a field

Editing fields can occur within the Fields grid.


Table designer - changing field order
Table designer

Changing the order of fields

To alter the position of a field within the table, select Move Up or Move Down as appropriated.


Table designer - designing indexes
Table designer

Designing indexes

Up to 10 indexes can be entered. A valid index contains at least 1 field. Within an index the sort order begins with the first field and proceeds to the last field. The index combo box shows the currently selected index. The index page contains 2 list boxes - the field list box contains all table fields not currently in the selected index. The index list box lists all fields that are in the current index.

Note that memo and graphic fields cannot be used in indexes.

Index parameters

Index name

The index name must be unique and up to 20 characters in length. Note that the primary index (key) cannot be named as it always has the default name of ‘Primary Index’ (or key).

Fields

Each index contains up to 10 fields. Each field can only be included once.


Table designer - selecting indexes
Table designer

Selecting an index

To change the current index, select a new entry from the index combo box. Note that it is only possible to select a new index if the current index is valid.


Table designer - adding an index
Table designer

Adding an index

Press the Add index button and enter a new name.


Table designer - deleting an index
Table designer

Deleting an index

Select the index to be deleted and press Delete index. The primary index cannot be deleted.


Table designer - renaming indexes
Table designer

Renaming an index

Press the Rename index button and enter a new name. The primary index cannot be renamed.


Table designer - editing an index
Table designer

Editing an index

Use field shift buttons to move fields in to and out of the index:

>	- 	add one field to index

>>	-	add all fields to index (in table order)

<	-	remove one field from index

<<	-	clear all fields from index

Changing a field position within an index

Use the Up or Down buttons to move a field up or down with an index.


Table designer - using another table's design
Table designer

Borrowing another table's design

To design a new table based on an existing design, select the Borrow design button and choose the table to copy. This will erase all data entered to date and replace it with the design of the borrowed table. Further editing can proceed as desired from there.


Table designer - creating tables
Table designer

Creating a table

When you are happy with your design, a table is created by selecting Save. You will be prompted for a table name. If you enter the name of a table that already exists, the old table will be destroyed and replaced by the new table - all data will be lost.

Closing without saving

To close the designer without saving changes, select Cancel.


Contact

MiniBase is written by Graham Pitson. I hope you find it useful.

e-mail me at:

gpitson@alphalink.com.au

home page:

http://www.alphalink.com.au/~wdtaylo/MiniBase.htm